Instead of defaulting to a natural scroll behavior,
have the workspace switch action use the natural-scroll setting
in org.gnome.peripherals.touchpad to determine the correct
direction of travel when swiping. 4 finger swipes will then
match the behavior of the rest of the UI.
Reference: https://gitlab.gnome.org/GNOME/gnome-shell/issues/516
this._dx = 0;
this._dy = 0;
actor.connect('captured-event', this._handleEvent.bind(this));
+ this._touchpadSettings = new Gio.Settings({schema_id: 'org.gnome.desktop.peripherals.touchpad'});
},
_checkActivated() {
// Scale deltas up a bit to make it feel snappier
this._dx += dx * 2;
- this._dy += dy * 2;
+ if(!(this._touchpadSettings.get_boolean('natural-scroll')))
+ this._dy -= dy * 2;
+ else
+ this._dy += dy * 2;
+
this.emit('motion', this._dx, this._dy);
} else {
if ((event.get_gesture_phase() == Clutter.TouchpadGesturePhase.END && ! this._checkActivated()) ||